package com.xw.functionService.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.xw.functionService.mapper.VideoInfoMapper;
import com.xw.functionService.model.VideoInfo;
import com.xw.functionService.service.VideoInfoService;
/**
 * 视频接口实现类
 * @author xiaoshengda
 *
 * @date 创建时间：2018年4月5日 下午12:11:03
 */
@Service
public class VideoInfoServiceImpl implements VideoInfoService {
   @Autowired
   private VideoInfoMapper videoInfoMapper;
	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public void del(Long videoId) {
     this.videoInfoMapper.del(videoId);
	}

	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public void insert(VideoInfo videoInfo) {
    this.videoInfoMapper.insert(videoInfo);
	}

	@Override
	public VideoInfo loadById(Long videoId) {
		return this.videoInfoMapper.loadById(videoId);
	}

	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public void update(VideoInfo videoInfo) {
     this.videoInfoMapper.update(videoInfo);
	}

}
